/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef __TESTOBJS_HPP_
#define __TESTOBJS_HPP_

#include "picking.hpp"

//collection of test objects for picking

class clickable : public CGLPickable, public CGLPickCallback
{
  public:
    clickable();
    
    void Draw();
    
    void OnFocus(TGLPickEvent event);
    
    void OnFocusLost(TGLPickEvent event);
    
    void OnPick(TGLPickEvent event);
    
    void OnRelease(TGLPickEvent event);
    
    int x;
    int y;
    bool down;
    bool focused;
};

class draggable : public CGLPickable, public CGLPickCallback
{
  public:
    draggable();
    
    void Draw();
    
    void OnPick(TGLPickEvent event);
    
    void OnRelease(TGLPickEvent event);
    
    void OnDrag(TGLPickEvent event);
    
    float x;
    float y;
    float OldX, OldY;
    bool dragged;
    
};

class cube : public CGLPickable, public CGLPickCallback
{
  public:
    cube();
    
    void Draw();
    
    void OnFocus(TGLPickEvent event);
    
    void OnFocusLost(TGLPickEvent event);
    
    void OnPick(TGLPickEvent event);
    
    void OnRelease(TGLPickEvent event);
    
    void OnDrag(TGLPickEvent event);
    
    float x;
    float y;
    float z;
    float OldX, OldY, OldZ;
    bool dragging;
    bool focused;
    float r;
    TGLPickEvent pick;
};

class torus : public CGLPickable, public CGLPickCallback
{
  public:
    torus();
    
    void Draw();
    
    void OnFocus(TGLPickEvent event);
    
    void OnFocusLost(TGLPickEvent event);
    
    void OnPick(TGLPickEvent event);
    
    void OnRelease(TGLPickEvent event);
    
    void OnDrag(TGLPickEvent event);
    
    float x;
    float y;
    float z;
    float OldX, OldY, OldZ;
    bool dragging;
    bool focused;
    float r;
    TGLPickEvent pick;
};
#endif